"""
MicroPython micropython module stubs
Access to MicroPython internals
"""

from typing import Optional, Callable

def const(expr) -> int:
    """Declare a constant"""
    ...

def opt_level(level: Optional[int] = None) -> Optional[int]:
    """Get or set optimization level"""
    ...

def mem_info(verbose: Optional[bool] = None) -> None:
    """Print memory info"""
    ...

def qstr_info(verbose: Optional[bool] = None) -> None:
    """Print qstr pool info"""
    ...

def stack_use() -> int:
    """Return current stack usage"""
    ...

def heap_lock() -> None:
    """Lock the heap"""
    ...

def heap_unlock() -> None:
    """Unlock the heap"""
    ...

def kbd_intr(chr: int) -> None:
    """Set character for KeyboardInterrupt"""
    ...

def schedule(func: Callable, arg) -> None:
    """Schedule a function to be called"""
    ...
